<?php
use Illuminate\Database\Capsule\Manager as Capsule;
//定义常量
define('BASE_PATH',__DIR__);

//自动载入文件
require  BASE_PATH.'./vendor/autoload.php';

//数据库配置
$capsule = new Capsule;

$capsule->addConnection(require  BASE_PATH.'./config/database.php');

$capsule->bootEloquent();

//错误提示
$whoops=new \Whoops\Run;
$whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler());
$whoops->register();